#ifndef __ALAW_CODEC_H__
#define __ALAW_CODEC_H__ 1

#include "codec.h"

class CAlawCodec : public ICodec
{
public:
	CAlawCodec();
	virtual ~CAlawCodec();

	virtual NAudioFormats::ECodec getCodecType();

	virtual double convertFromS8ToDouble(int8_t pSample);
	virtual int8_t convertFromDoubleToS8(double pSample);

	virtual double convertFromU8ToDouble(uint8_t pSample);
	virtual uint8_t convertFromDoubleToU8(double pSample);

	virtual double convertFromS16ToDouble(int16_t pSample);
	virtual int16_t convertFromDoubleToS16(double pSample);

	virtual double convertFromU16ToDouble(uint16_t pSample);
	virtual uint16_t convertFromDoubleToU16(double pSample);
private:
	static unsigned char mExponentTable[128];

	CAlawCodec(const CAlawCodec& );
	CAlawCodec& operator=(const CAlawCodec& );
};

#endif
